package com.monkeyk.springinaction.thymeleaf.domain;

import java.io.Serializable;

/**
 * 2017/11/24
 *
 * @author Shengzhao Li
 */
public abstract class AbstractDomain implements Serializable {
    private static final long serialVersionUID = -7639625426115785601L;


    protected int id;

    public AbstractDomain() {
    }

    public int id() {
        return id;
    }

    @SuppressWarnings("unchecked")
    public <T extends AbstractDomain> T id(int id) {
        this.id = id;
        return (T) this;
    }
}
